package cc.rico.guava;

import java.util.Date;
import java.util.Objects;

/**
 * @Author: Dell
 * @Date: 2018/12/25
 * @Description:
 */
public class User {

    private String name;
    private int age;
    private int sex;
    private Date birthday;

    public User() {

    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        User user = (User) o;
        return age == user.age &&
                sex == user.sex &&
                name.equals(user.name) &&
                birthday.equals(user.birthday);
    }

    @Override
    public int hashCode() {
        return Objects.hash(name, age, sex, birthday);
    }
}
